package com.lemeng.service.impl;

import com.lemeng.service.CategoryService;
import com.lemeng.service.SkuService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Init implements InitializingBean {
    @Autowired
    CategoryService categoryService;
    @Autowired
    SkuService skuService;

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("缓存预热开始");
        categoryService.selectCategoryRedis();
        //skuService.importDateToes();
        System.out.println("缓存预热结束");

    }
}
